<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Login Form</title>
		<link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css"
		type="text/css" media="all">
		
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>js/extjs/resources/css/ext-all.css" />
	<script src="<?php echo base_url(); ?>js/extjs/adapter/ext/ext-base.js"></script>
	<script src="<?php echo base_url(); ?>js/extjs/ext-all-debug.js"></script	
	
</head> 
<body>
<?php echo base_url(); ?>
	<script>
//		Ext.onReady(function(){
//		Ext.Msg.alert('Hello', 'World');
//		});

//		Ext.onReady(function(){
//		Ext.BLANK_IMAGE_URL = 'images/s.gif';
//		Ext.Msg.show({
//		title: 'Milton',
//		msg: 'Have you seen my stapler?',
//		icon: 'milton-icon',
//		fn: function(btn) {
//			Ext.Msg.alert('You Clicked', btn);
//			},
//		buttons: {
//			yes: true,
//			no: true,
//			cancel: true
//			}
//		});
//		});
       
		Ext.onReady(function(){
		 var genres = new Ext.data.Store({
				reader: new Ext.data.JsonReader({
				fields: ['id', 'username'],
				root: 'rows'
				}),
				proxy: new Ext.data.HttpProxy({
				url: 'main/combobox'
				}),
				autoLoad: true
			});
			var movie_form = new Ext.FormPanel({ 
			url: 'main/combobox',
			renderTo: document.body,
			frame: true,
			title: 'Movie Information Form',
			width: 250,
			items: [{
			xtype: 'textfield',
			fieldLabel: 'Title',
			name: 'title'
			},{
			xtype: 'textfield',
			fieldLabel: 'Director',
			name: 'director'
			},{
			xtype: 'datefield',
			fieldLabel: 'Released',
			name: 'released'
			},
			{
				xtype: 'combo',
				name: 'genre',
				fieldLabel: 'Genre',
				mode: 'local',
				store: genres,
				displayField:'username',
				width: 130,
				listeners: {
				select: function(f,r,i){
				if (i == 0){
				Ext.Msg.prompt('New Genre','Name',Ext.emptyFn);
				}
				}
				}
				}
//			,
//			genres

			]
			});
		});
	</script>
  
</body>
</html>
